/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.windesheim.archdemo.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * BAD BAD solution for lack of runtime weaving
 * @author reindert
 */
public class GlobalInstances {
    
    private static OrderDao orderDao;
    private static ProductDao productDao;
    private static CustomerDao customerDao;
    private static AddressDao addressDao;

    @Autowired
    public void setAddressDao(AddressDao addressDao) {
        GlobalInstances.addressDao = addressDao;
    }

    @Autowired
    public void setCustomerDao(CustomerDao customerDao) {
        GlobalInstances.customerDao = customerDao;
    }

    @Autowired
    public void setOrderDao(OrderDao orderDao) {
        GlobalInstances.orderDao = orderDao;
    }

    @Autowired
    public void setProductDao(ProductDao productDao) {
        GlobalInstances.productDao = productDao;
    }
  
    public static OrderDao getOrderDao(){
        return orderDao;
    }

    public static AddressDao getAddressDao() {
        return addressDao;
    }

    public static CustomerDao getCustomerDao() {
        return customerDao;
    }

    public static ProductDao getProductDao() {
        return productDao;
    }
    
    
}
